package com.example.smartwaterapi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 饮水记录实体类
 */
@Data
@TableName("water_records")
public class WaterRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 设备ID
     */
    private Long deviceId;

    /**
     * 饮水量(ml)
     */
    private Integer amount;

    /**
     * 饮品类型：water,tea,coffee,juice,milk,other
     */
    private String drinkType;

    /**
     * 水温
     */
    private Double temperature;

    /**
     * 饮水时间
     */
    private LocalDateTime recordTime;

    /**
     * 饮水日期
     */
    private LocalDate recordDate;

    /**
     * 小时
     */
    private Integer hour;

    /**
     * 来源 1:手动 2:设备自动 3:导入
     */
    private Integer source;

    /**
     * 备注
     */
    private String notes;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
}
